package com.ruoyi.client.service.impl;

import com.ruoyi.client.mapper.ClientStoreMapper;
import com.ruoyi.client.pojo.vo.StoreDetailVo;
import com.ruoyi.client.pojo.vo.StoreListVo;
import com.ruoyi.client.service.ClientStoreService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class ClientStoreServiceImpl implements ClientStoreService {

    @Resource
    private ClientStoreMapper clientStoreMapper;

    @Override
    public StoreDetailVo getStoreDetail(Long storeId) {
        if (storeId == null) {
            throw new IllegalArgumentException("店铺ID不能为空");
        }
        return clientStoreMapper.selectStoreDetail(storeId);
    }

    @Override
    public List<StoreListVo> getStoreList() {
        return clientStoreMapper.selectStoreList();
    }
}